package com.tengju.support.domain.model.sms;

import lombok.Getter;

/**
 * @author chenhang
 * @Date 2021/11/15
 */
@Getter
public enum SmsKey {

    UPCOMING_NOTICE("upcoming","upcoming");

    private final String bizGroup;
    private final String key;

    SmsKey(String bizGroup, String key) {
        this.bizGroup = bizGroup;
        this.key = key;
    }

    public static SmsKey fromName(String bizGroup, String key) {
        for (SmsKey smsKey : values()) {
            if (smsKey.bizGroup.equals(bizGroup) && smsKey.key.equals(key)) {
                return smsKey;
            }
        }
        return null;
    }




}
